using FluentNHibernate.Mapping;
using Wikey.Entity;

namespace Wikey.Domain.Mappings
{
    public class SpaceMap : ClassMap<Space> {
        public SpaceMap() {
            Id(x => x.Id);
            Map(x => x.Name);
            Map(x => x.Description).Length(200);
            Map(x => x.FriendlyUrlName).Length(200);
            HasMany(x => x.Pages).Inverse().KeyColumn("SpaceId").Cascade.All();
            Not.LazyLoad();

        }
    }
}